.todo-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
}

.todo-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
}


/* 输入区域样式 */

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.todo-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.todo-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.add-button {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-button:hover {
    background-color: #0056b3;
}

.add-button:active {
    transform: translateY(1px);
}


/* Todo列表样式 */

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.todo-item:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
    opacity: 0.7;
}

.delete-button {
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #c82333;
}

.delete-button:active {
    transform: translateY(1px);
}


/* 历史记录控制按钮样式 */

.history-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.history-button {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.history-button:hover {
    background-color: #5a6268;
}

.clear-history-button {
    padding: 10px 20px;
    background-color: #ffc107;
    color: #212529;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-history-button:hover {
    background-color: #e0a800;
}


/* 历史记录面板样式 */

.history-panel {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
}


/* 按周分组的容器 */

.history-weeks {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* 周分组样式 */

.week-group {
    border-radius: 8px;
    padding: 15px;
    border: 2px solid;
    transition: all 0.3s ease;
}


/* 本周样式 - 绿色主题 */

.week-group.current-week {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}


/* 上周样式 - 蓝色主题 */

.week-group.last-week {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}


/* 更早周样式 - 灰色主题 */

.week-group.older-week {
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-color: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
    opacity: 0.9;
}


/* 周标题样式 */

.week-title {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}


/* 本周标题颜色 */

.current-week .week-title {
    color: #155724;
    border-bottom-color: rgba(21, 87, 36, 0.2);
}


/* 上周标题颜色 */

.last-week .week-title {
    color: #004085;
    border-bottom-color: rgba(0, 64, 133, 0.2);
}


/* 更早周标题颜色 */

.older-week .week-title {
    color: #495057;
    border-bottom-color: rgba(73, 80, 87, 0.2);
}


/* 周计数样式 */

.week-count {
    font-size: 0.9em;
    font-weight: normal;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


/* 复制按钮样式 - iOS 16 液态玻璃效果 */

.copy-week-button {
    font-size: 0.8em;
    padding: 6px 12px;
    background: rgba(243, 199, 4, 0.998);
    border: 1px solid rgba(243, 164, 18, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-left: 8px;
    color: #ffffff;
    font-weight: 500;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px rgba(147, 112, 219, 0.1), 0 1px 2px rgba(147, 112, 219, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.copy-week-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(166, 31, 31, 0.2), transparent);
    transition: left 0.5s ease;
}

.copy-week-button:hover {
    background: rgba(141, 111, 203, 0.25);
    border-color: rgba(147, 112, 219, 0.5);
    color: rgb(255, 255, 255);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2), 0 2px 6px rgba(147, 112, 219, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.copy-week-button:hover::before {
    left: 100%;
}

.copy-week-button:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}


/* 不同周的复制按钮主题色调整 */

.current-week .copy-week-button {
    background: rgba(147, 112, 219, 0.18);
    border-color: rgba(147, 112, 219, 0.35);
}

.current-week .copy-week-button:hover {
    background: rgba(147, 112, 219, 0.28);
    border-color: rgba(147, 112, 219, 0.55);
    box-shadow: 0 4px 16px rgba(147, 112, 219, 0.25), 0 2px 8px rgba(40, 167, 69, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.last-week .copy-week-button {
    background: rgba(147, 112, 219, 0.16);
    border-color: rgba(147, 112, 219, 0.32);
}

.last-week .copy-week-button:hover {
    background: rgba(147, 112, 219, 0.26);
    border-color: rgba(147, 112, 219, 0.52);
    box-shadow: 0 4px 16px rgba(147, 112, 219, 0.23), 0 2px 8px rgba(0, 123, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.older-week .copy-week-button {
    background: rgba(147, 112, 219, 0.14);
    border-color: rgba(147, 112, 219, 0.28);
    opacity: 0.9;
}

.older-week .copy-week-button:hover {
    background: rgba(147, 112, 219, 0.24);
    border-color: rgba(147, 112, 219, 0.48);
    opacity: 1;
    box-shadow: 0 4px 16px rgba(147, 112, 219, 0.2), 0 2px 8px rgba(108, 117, 125, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.history-panel h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.2rem;
    text-align: center;
}

.no-history {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 20px 0;
}


/* 历史记录列表样式 */

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}


/* 不同周的历史记录项悬停效果 */

.current-week .history-item:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #28a745;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.last-week .history-item:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.older-week .history-item:hover {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #6c757d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.history-action {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.history-time {
    font-size: 12px;
    color: #6c757d;
}

.remove-history-button {
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.remove-history-button:hover {
    background-color: #c82333;
}

.remove-history-button:active {
    transform: translateY(1px);
}


/* 统计信息样式 */

.todo-stats {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.todo-stats p {
    margin: 8px 0;
    font-size: 16px;
    color: #495057;
}

.todo-stats p:first-child {
    margin-top: 0;
}

.todo-stats p:last-child {
    margin-bottom: 0;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .todo-container {
        padding: 15px;
    }
    .todo-container h1 {
        font-size: 2rem;
    }
    .input-section {
        flex-direction: column;
    }
    .todo-input {
        margin-bottom: 10px;
    }
    .todo-item {
        padding: 12px;
    }
    .todo-text {
        font-size: 14px;
    }
    /* 历史记录响应式样式 */
    .history-controls {
        flex-direction: column;
        align-items: center;
    }
    .history-panel {
        padding: 15px;
        max-height: 300px;
    }
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .history-info {
        width: 100%;
    }
    .remove-history-button {
        align-self: flex-end;
    }
}